package com.china08.yxyapi.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * RabbitMQ:队列配置:
 * 
 * @author Administrator
 *
 */
@Configuration
@EnableScheduling
public class RabbitQueueConfig {

    // ## 保持活跃
    public static final String YW_QUEUE_KEEP_ALIVE = "yw.queue.keep.alive";

    @Bean
    public Queue YxKeepAliveQueue() {
        System.out.println("configuration YW_QUEUE_KEEP_ALIVE ........................");
        return new Queue(YW_QUEUE_KEEP_ALIVE, true);
    }
}
